<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.biz.utils.ConfigUtil" %>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
    String resoursUrl = ConfigUtil.get("RESOURCES_URL");
%>

<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>个人中心</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="format-detection" content="telephone=no" />
	<link rel="stylesheet" href="<%=resoursUrl%>resources/assets/css/dxy.css" />
  <jsp:include page="/jsp/inc_head.jsp"></jsp:include>
    <style>
        .am-header {
            height: 66px;
            line-height: 66px;
        }
        .am-header-default .am-header-title a {
            color: #ff4c00;
        }
        .am-header-default .am-header-nav>a {
            color: #ff4c00;
         }
        .grzxbody{
            position:absolute;
            width:100%;
            FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#fff,endColorStr=#fff); /*IE*/
            background:-moz-linear-gradient(top,#fff ,#fff);/*火狐*/
            background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#fff ), to(#fff));/*谷歌*/
            background-image: -webkit-gradient(linear,left bottom,left top,color-start(0, #fff ),color-stop(1, #fff));/* Safari & Chrome*/
            filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff ', endColorstr='#fff'); /*IE6 & IE7*/
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff ', endColorstr='#fff')"; /* IE8 */
        }
        .clickfresh {
            font-size: 13px;
            color: #ff4c00;
            outline: none;
            border: 1px solid #ff4c00;
            border-radius: 30px;
            height: 32px;
            line-height: 32px;
            padding: 0 30px;
            background-color: inherit;
        }
    </style>



</head>

<body class="grzxbody">
<header data-am-widget="header" class="am-header am-header-default" style=" background-color: initial;">
    <div class="am-header-left am-header-nav">
        <a href="${pageContext.request.contextPath}/client_toClientCenter.do" class="">
            <img src="<%=resoursUrl%>resources/assets/image/icon_left_write.png" style="margin-top:-2px; height:18px;" />&nbsp;返回
        </a>
    </div>
    <h1 class="am-header-title" style="line-height:18px;">
        <a href="#title-link" class="" style=" margin-top: 13px; display: inline-block;color:#ff4c00;">
            <span class="bigsize">付款</span><br/><span class="smallsize">久零安全支付</span>
        </a>
    </h1>
</header>
<div class="am-g pad10">
    <div class="am-u-sm-12 am-text-center payMA">
        <div class="payTXMNUM" id="payCodeNum">

        </div>
        <div class="payTXM" id="txm">
         <%--   <img src="<%=basePath %>resources/assets/image/paytxm.png" width="260" />--%>
        </div>
        <div class="payEWM" id="ewm">
          <%--  <img src="<%=basePath %>resources/assets/image/payewm.png" width="150" />--%>
        </div>
    </div>
    <div class="am-u-sm-12 am-text-center">
        <div class="autofresh" style="color:#ff4c00;">每分钟自动更新</div>
        <button type="button" class="clickfresh" onclick="loadPayCode()">点击手动刷新</button>
    </div>
</div>

<!--footer-->
<%--<jsp:include page="/jsp/inc_bottom.jsp"></jsp:include>--%>
<!--footer-->
<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
    <div class="am-modal-dialog">
        <div class="am-modal-hd" id="alert_title">哎呦喂，出错啦</div>
        <div class="am-modal-bd" id="alert_message"></div>
        <div class="am-modal-footer">
            <span class="am-modal-btn">确定</span>
        </div>
    </div>
</div>
<script>

    var ajaxpath="${pageContext.request.contextPath}";
    var settings = {

        barWidth: 2,
        barHeight:80,
        showHRI:false
    };
    var intervalzk = 1000*60;
    $(function () {
        //$("#txm").barcode("e32rfew2ew", "code128",settings);
     //   $("#ewm").qrcode("e32rfew2ew");
      //$("#txm").html("").show().barcode("2fe5ewrwe", "code128",settings);
      //  $("#ewm").html("").show().qrcode("2fe5ewrwe");
       loadPayCode();
       window.setInterval(function(){doReflush();}, intervalzk);
    });

    function doReflush()
    {
        loadPayCode();
    }
    function loadPayCode() {
        $("#txm").html("");
        $("#ewm").html("");
        var url = ajaxpath + "/userCenter/getNewPayCode.do?date_time=" + new Date().getTime();
        $.get(url,function(data){
        if(data.return_data.only_code!=undefined&&data.return_data.only_code!=null&&data.return_data.only_code!='')
        {$("#payCodeNum").html(data.return_data.only_code);}
            $("#txm").barcode(data.return_data.only_code, "code128",settings);
            $("#ewm").qrcode(data.return_data.only_code);
        })
    }


</script>
</body>

</html>
